<?php

namespace App\common\models\falseData;


class Points
{

    /**
     * 积分首页接口
     * @return array
     */
    public static function  pointsHomePage()
    {
        //		"data": {
        //			当前积分
        //			// 抽奖活动是否开启
        //			积分抽奖：{
        //				抽奖标题
        //				所需积分
        //				将品列表:[
        //					{
        //						奖品名
        //						奖品id
        //						奖品数量
        //						奖品图片
        //						奖品数量
        //						奖品规格
        //					}
        //				]
        //			}
        //		}

        //用户积分
        $mem_points = 132;
        $is_lucky_draw = 1;//1开启，0关闭
        //积分抽奖
        $point_lottery['title'] = '幸运大抽奖';
        $point_lottery['need_points'] = 10;
        $point_lottery['prize_lists'] = [
            [
                'prize_id' => '15',
                'prize_name' => '扫地机器人',
                'prize_num' => '2',
                'prize_img' => '图片地址',
                'prize_spec' => [
                    ['id'=>13,'spec_name'=>'手动规格1'],
                    ['id'=>2,'spec_name'=>'规格名称3'],
                ]
            ],
            [
                'prize_id' => '16',
                'prize_name' => '大手机',
                'prize_num' => '5',
                'prize_img' => '图片地址',
                'prize_spec' => [
                    ['id'=>120,'spec_name'=>'手机规格1'],
                    ['id'=>8,'spec_name'=>'手机名称3'],
                ]
            ]
        ];

        $data = ['mem_points' => $mem_points, 'is_lucky_draw' => $is_lucky_draw, 'point_lottery' => $point_lottery];
        return $data;
    }

    //积分兑换商品列表
    public function pointsGoodsLists()
    {
        //{
        //	"code": 200,
        //	"msg": "成功",
        //	"data": {
        //		积分商品图片
        //		积分商品标题
        //		积分商品二级标题
        //		积分商品所需积分
        //		积分商品所需价格
        //		积分商品id
        //	}
        //}
        $datas = [];
        $datas['total'] = 2;
        $datas['lists'] = [
            [
                'points_goods_id' => '10',
                'points_goods_img' => '图片地址',
                'points_goods_title' => '积分商品标题',
                'points_goods_subtitle' => '积分商品二级标题',
                'points' => '200000',
                'price' => '198.00',
            ],[
                'points_goods_id' => '11',
                'points_goods_img' => '图片地址2',
                'points_goods_title' => '积分商品标题2',
                'points_goods_subtitle' => '积分商品二级标题2',
                'points' => '155000',
                'price' => '368.00',
            ]
        ];

        return $datas;

    }


}
